//
//  Question.m
//  HotWord
//
//  Created by iPhuan on 13-4-1.
//
//

#import "Question.h"


@implementation Question

- (void)encodeWithCoder:(NSCoder *)aCoder
{
    [aCoder encodeObject:self.memberId forKey:@"memberId"];
	[aCoder encodeObject:self.avater forKey:@"avater"];
	[aCoder encodeObject:self.nickName forKey:@"nickName"];
	[aCoder encodeObject:self.title forKey:@"title"];
	[aCoder encodeObject:self.content forKey:@"content"];
    [aCoder encodeObject:self.examTag forKey:@"examTag"];
    [aCoder encodeObject:self.timestamp forKey:@"timestamp"];
    [aCoder encodeObject:self.isAnonymous forKey:@"isAnonymous"];
    [aCoder encodeObject:self.tag forKey:@"tag"];
	[aCoder encodeObject:self.answers forKey:@"answers"];

}

- (id)initWithCoder:(NSCoder *)aDecoder
{
	if ([self init]) {
        self.memberId = [aDecoder decodeObjectForKey:@"memberId"];
        self.avater = [aDecoder decodeObjectForKey:@"avater"];
		self.nickName = [aDecoder decodeObjectForKey:@"nickName"];
		self.title = [aDecoder decodeObjectForKey:@"title"];
		self.content = [aDecoder decodeObjectForKey:@"content"];
        self.examTag = [aDecoder decodeObjectForKey:@"examTag"];
        self.timestamp = [aDecoder decodeObjectForKey:@"timestamp"];
        self.isAnonymous = [aDecoder decodeObjectForKey:@"isAnonymous"];
        self.tag = [aDecoder decodeObjectForKey:@"tag"];
		self.answers = [aDecoder decodeObjectForKey:@"answers"];

    }
	return self;
}


-(void)dealloc
{
    [_memberId release];
    [_avater release];
    [_nickName release];
    [_title release];
    [_content release];
    [_examTag release];
    [_timestamp release];
    [_isAnonymous release];
    [_tag release];
    [_answers release];
    [super dealloc];
}


@end
